package com.java.simple.study.juc.p4;

import com.java.simple.study.tool.Sleeper;

/**
 * @author zhoujunlin
 * @date 2022年06月09日 21:33
 * @desc
 */
public class Initialize {

    private boolean initialized = false;

    public synchronized void init() {
        if (initialized) {
            return;
        }
        doInit();
        initialized = true;
    }

    private void doInit() {
        Sleeper.sleep(30);
    }

}
